home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19960209-19960425 / 000102_news@columbia.edu _Tue Feb 27 10:25:47 1996.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: news@columbia.edu
  2. Received: from apakabar.cc.columbia.edu (apakabar.cc.columbia.edu [128.59.35.159]) by watsun.cc.columbia.edu (8.7.3/8.7.3) with ESMTP id KAA20324 for <kermit.misc@watsun>; Tue, 27 Feb 1996 10:25:45 -0500 (EST)
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.7.3/8.7.3) id KAA16748 for kermit.misc@watsun; Tue, 27 Feb 1996 10:25:42 -0500 (EST)
  4. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  5. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: C-Kermit, UNIX and term variables
  8. Date: 27 Feb 1996 15:25:23 GMT
  9. Organization: Columbia University
  10. Lines: 47
  11. Message-ID: <4gv7p3$gah@apakabar.cc.columbia.edu>
  12. References: <4gla4o$rp6@csugrad.cs.vt.edu> <4glibl$5ss@csugrad.cs.vt.edu> <4gna22$ggh@apakabar.cc.columbia.edu> <4gsoj9$moc@csugrad.cs.vt.edu>
  13. NNTP-Posting-Host: watsun.cc.columbia.edu
  14.  
  15. In article <4gsoj9$moc@csugrad.cs.vt.edu>,
  16. Pete-O-Rama <haggerty@csugrad.cs.vt.edu> wrote:
  17. : Frank da Cruz (fdc@watsun.cc.columbia.edu) wrote:
  18. : : In any case, you might find you have an easier time writing your program
  19. : : entirely as a Kermit script, rather than trying to mix expect and Kermit.
  20. : : That's what the Kermit script language is for.
  21. : I would probably be writing it in Kermit script if I had known about it
  22. : before I started it in expect and got it working perfectly except for this
  23. : cron problem.  It runs just fine, right up until expect spawns the kermit 
  24. : process and Kermit apparently then terminates, killing the expect script
  25. : along with it.  The csh script wrapped around the expect script keeps running
  26. : but I just don't understand why Kermit fails.  I have set every term and 
  27. : environment variable I can see (set and setenv) and Kermit still seems to
  28. : need something else simulated.
  29. : What does Kermit "look" for when it starts up?  Is there some other way to
  30. : fool Kermit into thinking it is being run from a command line in an active
  31. : shell instead of being run from cron? (with a shell and expect script wrapped
  32. : around it)
  33. I run C-Kermit from cron jobs all the time, but without expect in the
  34. middle.  Kermit can read its commands from the keyboard, from a command
  35. file, from command-line options, or from redirected stdin.  The order in
  36. which the various possible command input sources are processed is spelled
  37. out on page 323 of "Using C-Kermit".
  38.  
  39. I have not tried controlling C-Kermit in interactive mode from an "expect"
  40. script and so cannot verify that it works, and it was not explicitly
  41. designed with this form of control in mind.
  42.  
  43. Rather than fight with getting this to work, I think it would be faster to
  44. simply convert the expect script to a C-Kermit command file using a series
  45. of:
  46.  
  47.   INPUT <sec> <string>
  48.   IF FAIL <command>
  49.   OUTPUT <string>
  50.  
  51. which (I believe, not being an "expect" expert) are equivalent to
  52. "expect-send" sequences, but more flexible, since you can specify a
  53. different timeout on each "expect" (INPUT), as well as a separate error
  54. handler for each one.  For that matter, you can even use C-Kermit SCRIPT
  55. command, which allows you to give an "expect"-style series of expect-send
  56. sequences (but in slightly different syntax).
  57.  
  58. - Frank